package com.zh.elec.dao.impl;

import java.util.List;

import com.zh.elec.dao.FactoryAddressDao;
import com.zh.elec.dao.base.BaseDao;
import com.zh.elec.model.FactoryAddress;

/**
 * 产地
 * @author scy
 *
 */
public class FactoryAddressDaoImpl extends BaseDao implements FactoryAddressDao {

	@Override
	public Object save(FactoryAddress obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object update(FactoryAddress obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object getObjById(FactoryAddress obj) {
		return this.getObjById(obj);
	}

	@Override
	public Object del(FactoryAddress obj) {
		return this.del(obj);
	}

	@SuppressWarnings("unchecked")
	public List<FactoryAddress> findHql(String hql) {
		return find(hql);
	}

	@Override
	public List<FactoryAddress> findAll() {
		return this.findHql(" from FactoryAddress ");
	}

	@Override
	public List<FactoryAddress> findByName(String name, Object value) {
		return this.findByName(name, value);
	}
}
